package jhub.text;

import java.text.MessageFormat;
import java.text.ParseException;

import jhub.DCProtocol;

public class ActiveSearchMessage extends DCRawCommand{
    
    private String clientAddress;
    private String searchstring;
    
    
    public ActiveSearchMessage(String command) throws ParseException {
        super(command);
        parse();
    }
    
    private void parse() throws ParseException{
        Object[] o = new MessageFormat(DCProtocol.ACTIVE_SEARCH_FORMAT).parse(command.toString());
        clientAddress = o[0].toString();
        searchstring = o[1].toString();
    }

    public String getClientAddress() {
        return clientAddress;
    }

    public void setClientAddress(String clientAddress) {
        this.clientAddress = clientAddress;
    }

    public String getSearchstring() {
        return searchstring;
    }

    public void setSearchstring(String searchstring) {
        this.searchstring = searchstring;
    }
}
